
<div class="layui-row">
	<div class="layui-col-md12" id="ukefu-monitor-top">
		<h1 class="site-h1"
			style="border-top: 1px solid #e6e6e6; border-right: 1px solid #e6e6e6;font-size: 21px;line-height:31px;">
			报警次数概况 
			<span class="uk_warn_times">共<em>${warns!''}</em>次</span>
			<span style="float:right;color:#aaa;font-size:14px;">
			<span><a href="/apps/monitor/<#if monitorview?? && monitorview=='1'>view/<#elseif nowview?? && nowview=='1'>view/</#if>desktop.html?<#if status?? && status!=''>status=${status!''}</#if><#if showsensitive?? && showsensitive>&showsensitive=${showsensitive!''}</#if><#if showsensitive?? && showsensitive>&showsensitive=${showsensitive!''}</#if><#if showtimeout?? && showtimeout>&showtimeout=${showtimeout!''}</#if><#if showinquenetimeout?? && showinquenetimeout>&showinquenetimeout=${showinquenetimeout!''}</#if>" 
					data-toggle="load" data-target="#ukefu-monitor-content">
						<i class="layui-icon" style="font-size:16px;color:#aaa;">&#xe669;</i></a>
			</span>
			最后刷新时间：${.now?string("yyyy-MM-dd HH:mm:ss")}
			<#if monitorview?? && monitorview=='1'>
			<span><a id="nowa" class="layui-btn" target="_blank" style="height: 31px;line-height: 30px;margin-left: 3px;" href="/apps/monitor/view/<#if subtype?? && subtype!=''>${subtype!''}<#else>callout</#if>/view.html?actid=<#if actid?? && actid!=''>${actid}</#if><#if begin?? && begin!=''>&begin=${begin}</#if><#if end?? && end!=''>&end=${end}</#if>" >
					投屏</a>
			</span>
			</#if>
			</span>
		</h1>
		<div class="layui-row">
			<div class="layui-col-md2">
				<div class="uk-measure uk-border uk_monitor">
					<div class="uk-measure-header">
						坐席敏感词报警
					</div>
					<div class="uk-measure-body" style="padding:0px;">
						<div class="ukefu-measure-title" style="color:#5092e1;">
							${agentfrewordssum!''}<b style="font-size:14px;">次</b>
						</div>
						<div class="ukefu-bt-submeasure">
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
									访客敏感词报警
								</span>
								<span style="color:#5092e1;">${servicefrewordssum!''}
								</span>
							</div>
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
								坐席敏感词报警
								</span>
								<span style="color:#5092e1;">${agentfrewordssum!''}
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-col-md2">
				<div class="uk-measure uk-border uk_monitor">
					<div class="uk-measure-header">
						平均响应超时<#if sessionConfig?? && !sessionConfig.responsetimeout>（已关闭监控）</#if>
					</div>
					<div class="uk-measure-body" style="padding:0px;">
						<div class="ukefu-measure-title" style="color:#5092e1;">
							<#if sessionConfig?? && sessionConfig.responsetimeout>${avgreplytime!''}<#else>0</#if><b style="font-size:14px;">秒</b>
						</div>
						<div class="ukefu-bt-submeasure">
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
									响应超时次数
								</span>
								<span style="color:#5092e1;"><#if sessionConfig?? && sessionConfig.responsetimeout>${resptimeoutscount!''}<#else>0</#if>
								</span>
							</div>
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
								坐席会话超时次数
								</span>
								<span style="color:#5092e1;"><#if sessionConfig?? && sessionConfig.responsetimeout>${msgtimeoutagentsum!''}<#else>0</#if>
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-col-md2">
				<div class="uk-measure uk-border uk_monitor">
					<div class="uk-measure-header">
						平均会话超时<#if sessionConfig?? && !sessionConfig.sestimeout>（已关闭监控）</#if>
					</div>
					<div class="uk-measure-body" style="padding:0px;">
						<div class="ukefu-measure-title" style="color:#5092e1;">
							<#if sessionConfig?? && sessionConfig.sestimeout>${agentservicetimeoutavg!''}<#else>0</#if><b style="font-size:14px;">秒</b>
						</div>
						<div class="ukefu-bt-submeasure">
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
									会话超时次数
								</span>
								<span style="color:#5092e1;"><#if sessionConfig?? && sessionConfig.sestimeout>${sessiontimeoutsum!''}<#else>0</#if>
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-col-md2">
				<div class="uk-measure uk-border uk_monitor">
					<div class="uk-measure-header">
						满意度报警<#if sessionConfig?? && !sessionConfig.satisfactions>（已关闭监控）</#if>
					</div>
					<div class="uk-measure-body" style="padding:0px;">
						<div class="ukefu-measure-title" style="color:#5092e1;">
							<#if sessionConfig?? && sessionConfig.satisfactions>${satisfactionalarmscount!''}<#else>0</#if><b style="font-size:14px;">次</b>
						</div>
						<div class="ukefu-bt-submeasure">
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
									邀请评价次数
								</span>
								<span style="color:#5092e1;"><#if sessionConfig?? && sessionConfig.satisfactions>${invitevalscount!''}<#else>0</#if>
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-col-md2">
				<div class="uk-measure uk-border uk_monitor">
					<div class="uk-measure-header">
						平均排队时长<#if sessionConfig?? && !sessionConfig.inquenetimeout>（已关闭监控）</#if>
					</div>
					<div class="uk-measure-body" style="padding:0px;">
						<div class="ukefu-measure-title" style="color:#5092e1;">
							<#if sessionConfig?? && sessionConfig.inquenetimeout>${queueavg!'0'}<#else>0</#if><b style="font-size:14px;">秒</b>
						</div>
						<div class="ukefu-bt-submeasure">
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
									排队超时次数
								</span>
								<span style="color:#5092e1;"><#if sessionConfig?? && sessionConfig.inquenetimeout>${quenetimeoutcount!''}<#else>0</#if>
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-col-md2">
				<div class="uk-measure uk-border uk_monitor">
					<div class="uk-measure-header">
						无效会话次数<#if sessionConfig?? && !sessionConfig.agentinvalid>（已关闭监控）</#if>
					</div>
					<div class="uk-measure-body" style="padding:0px;">
						<div class="ukefu-measure-title" style="color:#5092e1;">
							<#if sessionConfig?? && sessionConfig.agentinvalid>${invalidcount!''}<#else>0</#if><b style="font-size:14px;">次</b>
						</div>
						<div class="ukefu-bt-submeasure">
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
									访客排队中离开
								</span>
								<span style="color:#5092e1;"><#if sessionConfig?? && sessionConfig.agentinvalid>${queneoutcount!''}<#else>0</#if>次
								</span>
							</div>
							<div class="ukefu-bt-text-content">
								<span style="min-width:110px;display: inline-block;height: 24px;line-height: 24px;margin-right: 10px;">
								进入会话后离开
								</span>
								<span style="color:#5092e1;"><#if sessionConfig?? && sessionConfig.agentinvalid>${agentoutcount!''}<#else>0</#if>次
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="layui-row"
	style="height: 100%; background-color: #ffffff; margin-top: 10px;">
	<div class="layui-col-md12">
		<h1 class="site-h1"
			style="border-top: 1px solid #e6e6e6; border-right: 1px solid #e6e6e6;font-size: 21px;line-height:31px;">
			会话监控 
			<span class="uk_warn_times">共<em>${monitorcount!''}</em>个会话</span>
		</h1>
		
		<div class="layui-tab" style="margin: 2px 0;">
			<ul class="layui-tab-title">
				<li <#if !sessiontimeout && !sensitive && status?? && status=='inservice' && !showsensitive && !showtimeout && !showinquenetimeout>class="layui-this"</#if>><a href="/apps/monitor/<#if monitorview?? && monitorview=='1'>view/</#if>index<#if nowview && nowview=='1'>/view</#if>.html?status=inservice">咨询中的会话（${inservicecount!''}）</a></li>
				<li <#if !sessiontimeout && !sensitive && status?? && status=='inquene' && !showsensitive && !showtimeout  && !showinquenetimeout>class="layui-this"</#if>><a href="/apps/monitor/<#if monitorview?? && monitorview=='1'>view/</#if>index<#if nowview && nowview=='1'>/view</#if>.html?status=inquene">等待接入的会话（${inquenecount!''}）</a></li>
				<li <#if showsensitive>class="layui-this"</#if>><a href="/apps/monitor/<#if monitorview?? && monitorview=='1'>view/</#if>index<#if nowview && nowview=='1'>/view</#if>.html?showsensitive=true">坐席敏感词报警的会话（${frewordscount!''}）</a></li>
				<#if sessionConfig?? && sessionConfig.sestimeout><li <#if showtimeout>class="layui-this"</#if>><a href="/apps/monitor/<#if monitorview?? && monitorview=='1'>view/</#if>index<#if nowview && nowview=='1'>/view</#if>.html?showtimeout=true">会话超时的会话（${sessiontimeoutsum!''}）</a></li></#if>
				<#if sessionConfig?? && sessionConfig.agentinvalid><li <#if showinquenetimeout>class="layui-this"</#if>><a href="/apps/monitor/<#if monitorview?? && monitorview=='1'>view/</#if>index<#if nowview && nowview=='1'>/view</#if>.html?showinquenetimeout=true">排队超时的会话（${quenetimeoutcount!''}）</a></li></#if>
			</ul>

			<div class="layui-tab-content">

				<div class="layui-tab-item layui-show">
					<div class="box-body ukefu-im-theme">
						<div class="layui-row">
							<div class="layui-col-md12">
								<table class="layui-table" lay-skin="line">
									<thead>
										<tr class="design-sortable-tr">
											<th>
												<input type="checkbox" id="all" onclick="$('.ids').prop('checked' , $(this).prop('checked'));"/>
											</th>
											<th>用户名</th>
											<th>接入渠道</th>
											<th>服务坐席</th>
											<th>咨询时间</th>
											<th>服务时间</th>
											<th>等待时长</th>
											<th>服务时长</th>
											<th>地域</th>
											
										</tr>
									</thead>
									<tbody>
										<#if agentServiceList?? && agentServiceList.content?? && agentServiceList.content?size gt 0>
										<#list agentServiceList.content as agentService>
										<tr class="tdHasContorllor design-dropable-td">
											<td style="width:1%;">
												<input type="checkbox" class="ids" name="ids" value="${agentService.id!''}"/>
											</td>
											<td class=" first_td_head">
												<a href="/apps/monitor/online/index.html?userid=${agentService.userid!''}&agentservice=${agentService.id!''}&channel=${agentService.channel!''}" data-toggle="ajax" data-type="fadein" data-width="950" data-height="550" data-title="${agentService.username!''}">
												${agentService.username!''}
												</a>
											</td>
											<td>
												${agentService.channel!''}
											</td>
											<td>
												<#if agentService.agentno?? && userlist?? && userlist?size gt 0>
												<#list userlist as user><#if user.id==agentService.agentno>${user.username!''}（${user.uname!''}）</#if></#list>
												</#if>
											</td>
											<td><#if agentService.logindate??>${agentService.logindate?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
											<td>
												<#if agentService.servicetime??>
												${agentService.servicetime?string('yyyy-MM-dd HH:mm:ss')}
												</#if>
											</td>
											<td>
												${(agentService.waittingtime/(1000*60*60))?string('00')}:${((agentService.waittingtime%(1000*60*60))/(1000*60))?string('00')}:${((agentService.waittingtime%(1000*60))/(1000))?string('00')}
											</td>
											
											<td class="minSize ">
												${(agentService.sessiontimes/(1000*60*60))?string('00')}:${((agentService.sessiontimes%(1000*60*60))/(1000*60))?string('00')}:${((agentService.sessiontimes%(1000*60))/(1000))?string('00')}
											</td>
											<td class=" ">${agentService.region!''}</td>
										</tr>
										</#list>
										<#else>
											<tr>
												<td colspan="20" style="height:400px;">
													<div class="ukefu-empty">
														<i class="layui-icon">&#xe63a;</i>
														<div style="">还没有历史会话</div>
													</div>
												</td>
											</tr>
										</#if>
									</tbody>
								</table>

							</div>
						</div>
						<div class="layui-row" style="padding:5px;">
							<div class="layui-col-md12" id="page" style="text-align:center;"></div>
						</div>

					</div>
				</div>
			</div>
		</div>

	</div>
</div>
<script>
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  
		  laypage.render({
				elem: 'page'
				,pages: <#if agentServiceList??>${agentServiceList.totalPages}<#else>0</#if> //总页数
				,curr:<#if agentServiceList??>${agentServiceList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						location.href = "/apps/monitor/index.html?p="+data.curr+"&username=${username!''}"+"&channel=${channel!''}"+"&skill=${skill!''}"+ "&agent=${agent!''}"+"&begin=${begin!''}"+"&end=${end!''}"+"&sbegin=${sbegin!''}"+"&send=${send!''}";;
								}
				}
		   });
		});
</script>
